package 高级;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Scanner;
//输入一个文件名，输出其中的byte内容
public class Zuoye04266 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        FileInputStream b=null;
        try {
            System.out.println("请输入目标文件路径");
            String a = scan.next();
            b = new FileInputStream(a);
            byte []c= new byte[b.available()];
            int length=b.read(c);
            String s = new String(c, 0, length);
            System.out.println(s);
            b.close();
//        System.out.println("请输入目标文件路径");
//        String a=scan.next();
//        File b=new File(a);
//        String[] c=b.list();
//        for (String d:c){
//            System.out.println(d);
        } catch (Exception e) {
            System.out.println("不存在");
            e.printStackTrace();
        }
    }
}
